From 99e88d6dd7b35d519ea304973e009f9b7050122e Mon Sep 17 00:00:00 2001 From: "smh22@tempest.cl.cam.ac.uk" Date: Wed, 16 Nov 2005 18:03:48 +0100 Subject: [PATCH] Trivial fixes for 64bit and xend. Signed-off-by: Steven Hand --- linux-2.6-xen-sparse/arch/xen/x86_64/kernel/setup.c | 9 ++++++--- tools/libxc/xc_linux_build.c | 2 +- tools/python/xen/xend/XendDomainInfo.py | 3 ++- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/linux-2.6-xen-sparse/arch/xen/x86_64/kernel/setup.c b/linux-2.6-xen-sparse/arch/xen/x86_64/kernel/setup.c index 0173775542..9e1a023282 100644 --- a/linux-2.6-xen-sparse/arch/xen/x86_64/kernel/setup.c +++ b/linux-2.6-xen-sparse/arch/xen/x86_64/kernel/setup.c @@ -770,9 +770,9 @@ void __init setup_arch(char **cmdline_p) pfn_to_mfn_frame_list_list = alloc_bootmem(PAGE_SIZE); HYPERVISOR_shared_info->arch.pfn_to_mfn_frame_list_list = virt_to_mfn(pfn_to_mfn_frame_list_list); - + fpp = PAGE_SIZE/sizeof(unsigned long); - for ( i=0, j=0, k=-1; i< max_pfn; i+=fpp, j++ ) + for ( i=0, j=0, k=-1; i< end_pfn; i+=fpp, j++ ) { if ( (j % fpp) == 0 ) { @@ -786,9 +786,12 @@ void __init setup_arch(char **cmdline_p) pfn_to_mfn_frame_list[k][j] = virt_to_mfn(&phys_to_machine_mapping[i]); } - HYPERVISOR_shared_info->arch.max_pfn = max_pfn; + HYPERVISOR_shared_info->arch.max_pfn = end_pfn; + } + + if ( ! (xen_start_info->flags & SIF_INITDOMAIN)) { acpi_disabled = 1; diff --git a/tools/libxc/xc_linux_build.c b/tools/libxc/xc_linux_build.c index d5c784c019..4cc145c931 100644 --- a/tools/libxc/xc_linux_build.c +++ b/tools/libxc/xc_linux_build.c @@ -629,7 +629,7 @@ static int setup_guest(int xc_handle, memset(start_info, 0, sizeof(*start_info)); rc = xc_version(xc_handle, XENVER_version, NULL); sprintf(start_info->magic, "xen-%i.%i-x86_%d%s", - rc >> 16, rc & (0xFFFF), sizeof(long)*8, + rc >> 16, rc & (0xFFFF), (unsigned int)sizeof(long)*8, dsi.pae_kernel ? "p" : ""); start_info->nr_pages = nr_pages; start_info->shared_info = shared_info_frame << PAGE_SHIFT; diff --git a/tools/python/xen/xend/XendDomainInfo.py b/tools/python/xen/xend/XendDomainInfo.py index 029a7d8c66..d241b88b08 100644 --- a/tools/python/xen/xend/XendDomainInfo.py +++ b/tools/python/xen/xend/XendDomainInfo.py @@ -597,7 +597,8 @@ class XendDomainInfo: if self.infoIsSet('image'): to_store['image'] = sxp.to_string(self.info['image']) - to_store['start_time'] = str(self.info['start_time']) + if self.infoIsSet('start_time'): + to_store['start_time'] = str(self.info['start_time']) log.debug("Storing VM details: %s", to_store) -- 2.30.2